<template>
    <view class="pagebox">
        <view class="rowline">
            <view class="left">品牌客户：</view>
            <view class="right">{{postItem.client_name}}</view>
        </view>
        <view class="rowline">
            <view class="left">项目：</view>
            <view class="right">{{postItem.title}}</view>
        </view>
        <view class="rowline">
            <view class="left">今日完成：</view>
            <view class="right">{{postItem.todayend}}</view>
        </view>
        <view class="rowline">
            <view class="left">未完成：</view>
            <view class="right">{{postItem.notend}}</view>
        </view>
        <view class="rowline">
            <view class="left">需协调：</view>
            <view class="right">{{postItem.needhelp}}</view>
        </view>
        <view class="rowline">
            <view class="left">图片：</view>
            <view class="right">
                <view class="imglist">
                    <view class="imgone" v-for="(val,index) in postItem.images" :key="index" @click="showimg(index)">
                        <image class="thumb" :src="val" mode="widthFix"></image>
                       
                    </view>    
                   
                </view>
            </view>
        </view>
       
    </view>
</template>

<script>
  
    export default{
        name:"Dailyadd",
        components: {},
        data(){
            return{
                orderlist:[
                    {
                        label:"不绑定",
                        id:0
                    },{
                        label:"天安门挂腻子",
                        id:1
                    }
                ],
             
                header:{},
                postItem:{
                    title:'',
                    todayend:'',
                    notend:"",
                    needhelp:"",
                    images:[]
                },
                rules:{
                    todayend:{
                        rules: [{
                            required: true,
                            errorMessage: '今日完成内容不能为空'
                        }]
                    }
                }
            }
        },
        onLoad(option){
            this.getone(option.id)
        },
        onShow(){
            
        },
        methods:{
            getone(id){
                this.$api.get(`daily/getone?id=${id}`).then(({data})=>{
                    this.postItem = data
                })
            },
            showimg(index){
                uni.previewImage({
                    urls:this.postItem.images,
                    current:index
                })
            }
        }
    }
</script>

<style lang="less" scoped>
    .pagebox{
        background-color: #fff;
        padding: 20rpx;
        width: 680rpx;
        margin: 0 auto;
        margin-top: 20rpx;
        .rowline{
            display: flex;
            justify-content: space-between;
            min-height: 90rpx;
            border-bottom: 1px solid #e9e9eb;
            padding: 20rpx 0;
            .left{
                width: 150rpx;
                text-align: right;
                font-weight: bold;
            }
            .right{
                width: 520rpx;
                color: #8f939c;
            }
        }
    }
    .btns{
        button{
            display: block;
            width: 80%;
            margin: 0 auto;
        }
    }
    .bbb{
        display: block;
        margin: 0 auto;
    }
    .imglist{
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        .imgone{
            width: 150rpx;
            height: 150rpx;
            border-radius: 5rpx;
            overflow: hidden;
            text-align: center;
            border: 1px solid #c7c9ce;
            margin-right: 20rpx;
            position: relative;
            .close{
                position: absolute;
                top: -10rpx;
                right: 2rpx;
                z-index: 9;
            }
            .thumb{
                width: 100%;
                height: 100%;
            }
        }
    }
</style>